This application makes reference to, incorporates the same herein, and claims all benefits accruing under 35 U.S.C. xc2xa7119 from an application for A METHOD FOR RESTORING A DAMAGED ROM BIOS earlier filed in the Korean Industrial Property Office on the 20th of December 1997 and there duly assigned Serial No. 71386/1997.
1. Technical Field
The present invention relates to a method and arrangement for restoring a damaged read-only memory (ROM) basic input/output system (BIOS) and, more particularly, to a method and arrangement for restoring a ROM BIOS stored in a flash memory to control a peripheral equipment when it is damaged due to an electrical impact.
2. Related Art
With the development of a computer, peripheral equipment relating to the computer have been improved and have various functions. The peripheral equipment has a separate central processing unit (CPU) to carry out various complex functions. A program which makes the CPU perform the various complex functions is referred to as a ROM BIOS.
The ROM BIOS must be executed as soon as electric power is applied to the peripheral equipment. On the other hand, the ROM BIOS is stored in a nonvolatile memory so that it is preserved when the supply of electric power to the peripheral equipment is interrupted.
Generally, a mask ROM, an erasable/programmable read-only memory (EPROM) or the like is used as a memory for storing the ROM BIOS. However, since the ROM BIOS has more functions and larger capability than a conventional ROM BIOS, it is rarely required that some functions be added to the ROM BIOS or that xe2x80x9cbugsxe2x80x9d in the ROM BIOS be corrected after the memory containing the ROM BIOS is produced. For that reason, a flash memory has recently been used as a nonvolatile memory to store the ROM BIOS. Such a flash memory is capable of preserving data therein even if the supply of electric power to the peripheral equipment is interrupted, and writing and reading of the data is possible.
Since the flash memory for storing the ROM BIOS is a storage element for storing data using electric signals, the ROM BIOS stored in the flash memory can be damaged by an electric impact applied to the peripheral equipment and noise generated in the peripheral equipment. In the case just described above, the peripheral equipment controlled by the ROM BIOS stored in the flash memory operates abnormally. Accordingly, ROM BIOS image data corresponding to the damaged ROM BIOS must be downloaded from a host computer to the peripheral equipment, and must be written into the flash memory.
Furthermore, ROM BIOS image data and a program for downloading the ROM BIOS data are needed for user to restore the damaged ROM BIOS. A manufacturer of the peripheral equipment must provide the ROM BIOS data and the program for downloading the ROM BIOS data to the user. As a result, the manufacturer is subjected to a burden of providing a post-sale service.
The present invention has been developed to overcome the above described problem.
It is an object of the present invention to provide a method and arrangement for restoring a ROM BIOS in a flash memory when the ROM BIOS is damaged due to electric impact.
To accomplish the above object of the present invention, there is provided a method for restoring a damaged ROM BIOS, comprising the steps of:
calculating a checksum of a ROM BIOS in a flash memory when peripheral equipment is reset;
detecting whether the checksum is correct;
detecting whether the flash memory is initialized when the checksum is incorrect;
downloading an entire ROM BIOS image from a host computer so that the flash memory is initialized;
restoring the ROM BIOS in the flash memory without the flash memory being initialized; and
resetting the peripheral equipment.
The downloading step includes the steps of:
deleting all sectors in the flash memory, except for a boot sector;
downloading the ROM BIOS data from the host computer connected to the peripheral equipment, and recording the ROM BIOS data in the flash memory; and
compressing and storing the ROM BIOS data in a compressing and storing sector.
The ROM BIOS restoring step includes the steps of:
deleting all of the sectors in the flash memory, except for the compressing and storing sector and the boot sector;
releasing or decompressing the ROM BIOS data which is compressed and stored in the compressing and storing sector; and
recording the released or decompressed ROM BIOS data is flash memory.